/****************************************************************************
 * Copyright (C) 2009-2011 Dimok
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ****************************************************************************/
#ifndef _SETTINGSMENU_H
#define _SETTINGSMENU_H

#include "../../GUI/gui.h"
#include "../../Themes/CTheme.h"
#include "GlobalSettings.hpp"
#include "SettingsBrowser.hpp"

class SettingsMenu : public GuiFrame, public sigslot::has_slots<>
{
	public:
		SettingsMenu();
		virtual ~SettingsMenu();
		
		void SetTitle(std::string title);
		
		enum
		{
			GUI,
			AUDIO,
			PATH,
			THEME,
			CONTROL,
			PARENTAL,
			FEATURES,
			UPDATE,
			DEFAULT,
			CREDITS,
		};
		
		sigslot::signal1<SettingsMenu *> ForcedClosing;
		
	private:
		void OnBackButtonClick(GuiButton *sender, int pointer, const POINT &p);
		void OnFlyingButtonClick(int menu);
		void OnFixEMiiDB();
		void OnThemeReloadRequest();
		
		bool fixEMiiNeeded;
		
		GlobalSettings * globalSettings;
		SettingsBrowser * settingsBrowser;
		
		GuiText * Title;
		
		GuiImageData * BgImgData;
		GuiImage * BgImg;
		
		GuiText * BackBtnTxt;
		PictureButton * BackBtn;
		
		GuiSound * BtnSoundClick;
		GuiSound * BtnSoundOver;
		
		GuiTrigger trigA;
};

#endif
